﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Vendas.Dialogs
{
    public partial class FormObservacoes : Form
    {
        public FormObservacoes(String observacaoAtual)
        {
            InitializeComponent();
            txtObservacao.Text = observacaoAtual;
        }

        private void FormObservacoes_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.Escape)
            {
                Close();
            }
        }

        public  String Observacao
        {
            get
            {
                return txtObservacao.Text;
            }
        }

        public static string GetObservacao(string observacaoAtual)
        {
            var f = new FormObservacoes(observacaoAtual);
            f.ShowDialog();
            return f.Observacao;
        }
    }
}
